package me.fung.rem.app.common

import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.padding
import androidx.compose.material.FloatingActionButton
import androidx.compose.material.Icon
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.unit.dp
import me.fung.rem.app.navigation

@Composable
fun BoxScope.goBackButton(
    modifier: Modifier = Modifier.padding(10.dp).alpha(0.7f).align(Alignment.BottomStart)
) {
    FloatingActionButton(
        modifier = modifier,
        onClick = { navigation.goBack() },
    ) {
        Icon(Icons.Default.ArrowBack, null)
    }
}